home *** CD-ROM | disk | FTP | other *** search
/ Guide To Cracking 2002 / Guide_to_Cracking_2002.iso / Tutorials / Nag and Time Trial / nag / ns31.txt < prev    next >
Encoding:
Text File  |  1999-07-16  |  7.9 KB  |  161 lines

  1.  
  2.  
  3.                      L                ZZZZZZ         RRRRR           SSSSS
  4.                      L                    Z          R    R         S
  5.                      L          aaa      Z      aaa  R    R  u   u  S
  6.                      L            a     Z         a  RRRRR   u   u  SSSSS
  7.                XX    L         aaaa    Z       aaaa  R    R  u   u       S
  8.               XXXX   L        a   a   Z       a   a  R    R  u   u       S
  9.              XXXXXX  LLLLLLL  aaaaa  ZZZZZZZ  aaaaa  R    R  uuuuu  SSSSSS
  10.              XXXXXX       
  11.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  12.        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  13.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  14.              XXXXXX
  15.              XXXXXX
  16.               XXXX        proudly presents his 19.Cracking Tutorial (04.07.1999)
  17.                XX                   LaZaRuS' "Kick the nag" approach
  18.  
  19. I.    Introduction
  20. I.1   Tools you need for my tutorial
  21. II.   The "Kick the nag" approach
  22. VI.   BTW
  23. VII.  All Tutorials by LaZaRuS
  24.  
  25. I.   Welcome to my 19st cracking tutorial.
  26. I.1  W32Dasm 8.9
  27.      XTheme Manager 2.2 (www.vclxx.com/~kuan)
  28.  
  29. II.  The "Kick the nag" approach
  30.      At first a word of warning. The method I show you is quite the opposite of "Zen" cracking.
  31.      In fact it goes more into the brute force section and all "Zen" guys would shoot my head if
  32.      they read this. But nevertheless, if every "standard" approaches to kill a nag-screen fail,
  33.      this *might* help.
  34.      As a target I have chosen XTheme Manager. No special reason, I just found it on a shareware
  35.      CD. Actually you can easily find out the correct serial to register it and get rid of the
  36.      nag-screen in this way. You can try it out later. This essay is about getting rid of the nag
  37.      with a patch.
  38.  
  39.      Load XTM.EXE in W32Dasm. Now choose "debug" and then "Auto Step Over". Now wait until the
  40.      nagscreen appears. At first the window appears and then it is filled with bitmaps and text.
  41.      The first sign of a nag-screen appears around :004E0169. You cannot locate the correct call
  42.      that makes the nagscreen appear immediately, because the instructions are executed to fast.
  43.      So terminate the prog, set a breakpoint on :004E0169 and restart it. This time choose "Run".
  44.      W32Dasm will break at :004E0169. Now "Step Over" slowly until the first part of the 
  45.      nag-screen appears. This will be at :004E0199.
  46.      You see this:
  47.  
  48.      :004E0169 B301                    mov bl, 01   ;; bl=1
  49.      :004E016B 84DB                    test bl, bl  ;; bl=0 ?
  50.      :004E016D 743C                    je 004E01AB  ;; if so, then jump beyond the nag
  51.      :004E016F 8B0D04414E00            mov ecx, dword ptr [004E4104]
  52.      :004E0175 8B09                    mov ecx, dword ptr [ecx]
  53.      :004E0177 B201                    mov dl, 01
  54.      :004E0179 A168C84900              mov eax, dword ptr [0049C868]
  55.      :004E017E E8E985F6FF              call 0044876C
  56.      :004E0183 A3D0654E00              mov dword ptr [004E65D0], eax
  57.      :004E0188 33D2                    xor edx, edx
  58.      :004E018A A1D0654E00              mov eax, dword ptr [004E65D0]
  59.      :004E018F E880CAFBFF              call 0049CC14
  60.      :004E0194 A1D0654E00              mov eax, dword ptr [004E65D0]
  61.      :004E0199 E8E2C4F6FF              call 0044C680                   ;; calls the nag-screen
  62.      :004E019E A1D0654E00              mov eax, dword ptr [004E65D0]
  63.      :004E01A3 8B10                    mov edx, dword ptr [eax]
  64.      :004E01A5 FF9284000000            call dword ptr [edx+00000084]
  65.  
  66.      * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  67.      |:004E016D(C)
  68.      |
  69.      :004E01AB B001                    mov al, 01
  70.      :004E01AD E80EDBF9FF              call 0047DCC0
  71.      :004E01B2 33C0                    xor eax, eax
  72.      :004E01B4 55                      push ebp
  73.  
  74.      Something tells me, the jump at :004E016D is *never* taken, eh. Let's change that. You can
  75.      either change the "mov bl, 01" to "mov bl, 00" or the "je 004E01AB" to "jmp 004E01AB". What-
  76.      ever, the nag-screen will be gone :)
  77.  
  78.  
  79.      As the last example was a little short, here comes one that shows my way of finding nags
  80.      better. The target is ToggleMouse 4.4.7
  81.      At the start the programs informs you how long you have left to test ToggleMouse. So
  82.      disassemble ToggleMouse.exe and enter the debug mode. Disable all API functions as they only
  83.      disturb. Choose "Auto step over" and wait until the nagscreen appears. Then the window that
  84.      displays the instructions that are currently executed looks like this:
  85.  
  86.      :0041886D push [ebp-64]
  87.      :00418870 push esi
  88.      :00418871 push esi
  89.      :00418872 call KERNEL32.GetModuleHandleA
  90.      :00418878 push eax
  91.      :00418879 call TOGGLEMOUSE.004230A0    // THIS LINE SHOULD BE ACTIVATED
  92.      :0041887E mov dword ptr [ebp-60], eax
  93.      :00418881 push eax
  94.      :00418882 call TOGGLEMOUSE.0041B433
  95.      :00418887 mov eax, dword ptr [ebp-14]
  96.      :0041888A mov ecx, dword ptr [eax]
  97.  
  98.      So terminate ToggleMouse, set a breakpoint on line :00418879 and restart it. Choose F9 (Run)
  99.      and W32Dasm should break here. Enter the call (F7) and choose "Auto step over" again. Wait
  100.      until the nag-screen appears. Now you should see this:
  101.  
  102.      :0042309F int 03
  103.      :004230A0 push [esp+10]
  104.      :004230A4 push [esp+10]
  105.      :004230A8 push [esp+10]
  106.      :004230AC push [esp+10]
  107.      :004230B0 call TOGGLEMOUSE.0042B617 // THIS LINE SHOULD BE ACTIVATED
  108.      :004230B5 ret 10
  109.      :004230B6 adc byte ptr [eax], al
  110.      :004230B8 call TOGGLEMOUSE.0042E9D8
  111.      :004230BD mov ecx, dword ptr [esp+04]
  112.      :004230C1 test ecx, ecx
  113.  
  114.      And again: Terminate, set new breakpoint at this call, restart ToggleMouse, and enter the
  115.      call. Then choose "Auto step over" until the nag-screen appears. This time you should see
  116.      this:
  117.  
  118.      :0042B64D call dword ptr [eax+00000084]
  119.      :0042B653 test eax, eax
  120.      :0042B655 je 0042B680
  121.      :0042B657 mov eax, dword ptr [esi]
  122.      :0042B659 mov ecx, esi
  123.      :0042B65B call TOGGLEMOUSE.00436F10 // THIS LINE SHOULD BE ACTIVATED
  124.      :0042B65E test eax, eax
  125.      :0042B660 jne 0042B677
  126.      :0042B662 mov ecx, dword ptr [esi+1C]
  127.      :0042B665 test ecx, ecx
  128.      :0042B667 je 0042B66E
  129.  
  130.      Now it's getting interesting: Look, there's a jump at line :0042B665 that leads beyond the
  131.      call that displays the nag. Let's change it in a hexeditor to jmp. Shit, the program doesn't
  132.      start anymore. So we have to go on (I hope you always patch a copy of the original file, as
  133.      you are not able to write to a file that is currently loaded in W32Dasm). Entering the call
  134.      again and tracing through the code until the nag-screen appears. Here the code is:
  135.  
  136.      :0041237C xor eax, eax
  137.      :0041237E jmp TOGGLEMOUSE.004123A5
  138.      :00412380 cmp dword ptr [00443B70], 00000041
  139.      :00412387 jg 0041236B
  140.      :00412389 push 00000001
  141.      :0041238B call TOGGLEMOUSE.004147CC  // THIS LINE SHOULD BE ACTIVATED
  142.      :00412390 cmp eax, 00000001
  143.      :00412393 pop ecx
  144.      :00412394 jne 0041236B
  145.      :00412396 mov ecx, ebx
  146.      :00412398 call TOGGLEMOUSE.00412684
  147.  
  148.      Let's try again. There's another jump that leads beyond the call that displays the nag. 
  149.      Let's change it to EB again and look what happens. The nag is gone, we have it :)
  150.      Now it's your turn. Turn your system's clock 1 year ahead and restart ToggleMouse. There's
  151.      another nag telling that the evaluation period has expired. Try to get rid of it using the
  152.      method I described.
  153.  
  154. I.   BTW this tutorial is for educational purposes only. Make sure to get the full version
  155.      legally. I withdraw myself from all responsibility, and trouble if you get into any.
  156.      
  157.      Greets to: Everyone in #cracking4newbies and +Sandman's forum
  158.  
  159. VII. All tutorials by LaZaRuS
  160.       
  161.